feat(ci): attest build provenance#60
Merged
Merged
Conversation
Add GitHub native build-provenance attestation to the GHCR publish workflow. The image is built and pushed with nerdctl, which has no --digestfile; the real sha256 digest is read back from the registry with skopeo after push and bound to the attestation via actions/attest-build-provenance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Estate attestation rollout
Adds GitHub native build-provenance attestation to
.github/workflows/ghcr-publish.yml.Push mechanism: nerdctl (
nerdctl build+nerdctl pushto ghcr.io), imageghcr.io/${{ github.repository }}.How the digest is obtained:
nerdctl pushhas no--digestfileflag, so immediately after the push the workflow reads the realsha256:...digest back from the registry withskopeo inspect --format '{{.Digest}}'(skopeo is pre-installed onubuntu-latest), authenticating with the sameGITHUB_TOKEN. That digest is exported as thepushstep output and fed to the attestation assubject-digest— it is the exact digest the registry holds for the pushed tag, not a guess.Changes:
id-token: write+attestations: writeto the job permissions.skopeo inspect.actions/attest-build-provenance@e8998f94…(v2, pinned) step withpush-to-registry: true.Verify with:
🤖 Generated with Claude Code